package com.zdlee.netty.server19.client.handler;

import com.zdlee.netty.server19.protocol.response.QuitGroupResponsePacket;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * @author zdlee
 * @description: ${DESCRIPTION}
 * @create 2018-12-01 16:02
 */
public class QuitGroupResponseHandler extends SimpleChannelInboundHandler<QuitGroupResponsePacket> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, QuitGroupResponsePacket msg) throws Exception {
        if(msg.isSuccess())
        {
            System.out.println("退出群聊[" + msg.getGroupId() + "]成功！");
        }else
        {
            System.out.println("退出群聊[" + msg.getGroupId() + "]失败！");
        }

    }

}
